<?php include( "templates/include/header.php"); ?>

<script type="text/javascript">

	var carousel = null;
	var radius_x = 0;
	var center_x = 0;
	var radius_y = 0;
	var center_y = 0;

	function ComputeCircle(){
		radius_x = ($('#AllPartners').width() / 2) - 100;
		center_x = radius_x + ($.browser.msie ? 100 : 50);
		radius_y = ($('#AllPartners').height() / 2) - 100;
		center_y = $('#ContentsContainer').position().top + ($('#AllPartners').height() / 2);
	}



	$(function(){
		ComputeCircle();
		carousel = $("#AllPartners").html($("#holder_images").html()).carousel3d({ control: 'timer',
											   delay: ( $.browser.msie ? 0.005 : 0.010),
											   radiusX:radius_x,
											   radiusY:radius_y,
											   centerY:center_y,
											   centerX:center_x
											 });

		$(window).bind('resize', function() {
			ComputeCircle();
			$(carousel).setCenter(center_x, center_y);
			$(carousel).setRadus(radius_x, radius_y);
		});

	});
</script>

<center>
  <div align="center" id="AllPartners" style="height:500px;width:100%;"></div>
</center>

<div id="holder_images" style="display:none">
  <?php
    foreach( $results['sponsor'] as $sponsor ) {
      echo( '<img height="100px" border="0" src="' . $sponsor->image . '" ');
      if( isset( $sponsor->url ) ) {
        echo( 'class="link" id="http://' . $sponsor->url . '" style="cursor:pointer" ' );
      }
      echo( 'title="' . $sponsor->name . '">' . "\n" );
    }
  ?>
</div>
<br />

<?php include( "templates/include/footer.php"); ?>